from django.db import models
from django.contrib.auth.models import User

JRC_PERMISSION_CHOICES = (
    (r"view", u"View")
    , (r"edit", u"Edit")
    , (r"delete", u"Delete")
)

class JrcPermission(User):
    PET_CHANGE = "auth.jrc_pet_change"
    MARKET_CHANGE = "auth.jrc_market_change"
    TRADINGSYSTEMS_CHANGE = "auth.jrc_tradingsystems_change"
    IMPORT_CHANGE = "auth.jrc_import_change"
    
    _permissions = {
        PET_CHANGE: None
        , MARKET_CHANGE: None
        , TRADINGSYSTEMS_CHANGE: None
        , IMPORT_CHANGE: None
    }
    class Meta:
        proxy = True
        permissions = (
            ("jrc_pet_change", u"Can change PET")
            , ("jrc_market_change", u"Can change Market")
            , ("jrc_tradingsystems_change", u"Can change Trading-systems")
            , ("jrc_import_change", u"Can change Import")
        )
        

